import com.beans.*;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");
//        UserController controller=context.getBean("userController",UserController.class);
//        controller.sayHi();
//        UserService userService=context.getBean(UserService.class);
//        userService.sayHi();
//        UserRepository userRepository=context.getBean(UserRepository.class);
//        userRepository.sayHi();
//        UserConfig config=context.getBean(UserConfig.class);
//        config.sayHi();
//        UserComponent component=context.getBean(UserComponent.class);
//        component.sayHi();
//        APIController apiController=context.getBean("APIController",APIController.class);
//        apiController.sayHi();
//        User user=context.getBean("user1",User.class);
//        System.out.println(user);
//        UserController2 userController2=context.getBean(UserController2.class);
//        userController2.sayHi();
//        UserController3 userController3=context.getBean(UserController3.class);
//        userController3.sayHi();
        UserController4 userController4=context.getBean(UserController4.class);
        userController4.sayHi();
    }

}
